<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2020/1/27 0027
  Time: 16:37
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
</head>
<body>

    <h2>常用的注解</h2>

    <%--1.1获取请求参数注解。不用url中的key和方法中的参数名写一样了--%>
    <a href="anno/testRequestParam?name=小龙">RequestParam注解测试</a>
    <br>
    <br>
    <br>
    <%--1.2 获取请求体注解--%>
    <form action="anno/testRequestBody" method="post">
        姓名：<input type="text" name="username" /><br/>
        密码：<input type="text" name="password" /><br/>
        <input type="submit" value="提交" />
    </form>

    <br>
    <br>
    <br>
    <%--1.3 url占位符5；--%>
    <a href="anno/testPathVariable/5">PathVariable注解测试</a>
    <br>
    <br>
    <br>
    <%--1.4 获取请求头的信息--%>
    <a href="anno/testRequestHeader">RequestHeader注解测试</a>
    <br>
    <br>
    <br>
    <%--1.5 获取Cookie信息--%>
    <a href="anno/testCookieValue">CookieValue注解测试</a>
    <br>
    <br>
    <br>
    <%-- 1.6.1 ModelAttribute注解   --%>
    <h6>ModelAttribute注解 修饰的方法有返回值</h6>
    <form action="anno/testModelAttribute1" method="post">
        姓名：<input type="text"  name ="uname"/><br/>
        年龄：<input type="text"  name ="age"/><br/>
        <input type="submit" value="提交"/>
    </form>
    <br>
    <br>
    <h6>ModelAttribute注解 修饰的方法没有返回值</h6>
    <%-- 1.6.2  ModelAttribute注解   --%>
    <form action="anno/testModelAttribute2" method="post">
        姓名：<input type="text"  name ="uname"/><br/>
        年龄：<input type="text"  name ="age"/><br/>
        <input type="submit" value="提交"/>
    </form>
    <br>
    <br>
    <a href="anno/testSessionAttributes">testSessionAttributes</a>
    <a href="anno/getSessionAttributes">getSessionAttributes</a>
    <a href="anno/delSessionAttributes">delSessionAttributes</a>
</body>
</html>
